Several recent experimental studies have confirmed the possibility of switching the magnetization direction in the small magnetic domains by pumping large spin-polarized currents through them. On the basis of equations proposed by J.Slonczewski for the case when magnetization of the domains is almost uniform, we analyze the stability and switching for two types of magnetic and shape anisotropies of a magnetic domain in a nanowire and find qualitatively different behavior, including different shapes of bistable regions. Our study is analytic as opposed to recent numeric work. Assumed anisotropies can be realized in experiments and our predictions can be used to experimentally test the theory of spin-transfer torques. Such test would be especially interesting since alternative approaches are discussed in the literature.